package com.miraksoft.statewatcher.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

import com.miraksoft.statewatcher.R;


public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        final Button btnConfig = (Button) findViewById( R.id.btnConfig);
        final Button btnStart = (Button) findViewById( R.id.btnStartSession);
        final Button btnResume = (Button) findViewById( R.id.btnResumeSession);
        final Button btnHelp = (Button) findViewById( R.id.btnHelp);
        final Button btnAbout = (Button) findViewById( R.id.btnAbout);
        final Button btnQuit = (Button) findViewById( R.id.btnQuit);
        
        btnConfig.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				startActivity(new Intent(MainActivity.this, ConfigActivity.class));				
			}
			
		});
        
        btnStart.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				startActivity(new Intent(MainActivity.this, ActiveSessionActivity.class));				
			}
			
		});
        
        btnResume.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				//startActivity(new Intent(MainActivity.this, EditWatchedObjectActivity.class));				
			}
			
		});
        
        btnHelp.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				//startActivity(new Intent(MainActivity.this, EditWatchedObjectActivity.class));				
			}
			
		});
        
        btnAbout.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				//startActivity(new Intent(MainActivity.this, EditWatchedObjectActivity.class));				
			}
			
		});
        
        btnQuit.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View arg0) {
				
				finish();
	            System.exit(0);
	            
			}
			
		});
        
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    
}
